home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1998 August: Technology Seed / August 1998 ADC Seed CD.toast / Mac OS 8.5b2 / allegro-b2-pseudo-SDK / CIncludes / ATSLayoutTypes.h < prev    next >
Encoding:
C/C++ Source or Header  |  1998-07-17  |  3.6 KB  |  125 lines  |  [TEXT/MPS ]

  1. /*
  2.      File:        ATSLayoutTypes.h
  3.  
  4.      Contains:    Apple Text Services layout public structures and constants.
  5.  
  6.      Version:    Technology:    Allegro
  7.                  Release:    Allego Seed, Use with 3.1 Universal Interfaces
  8.  
  9.      Copyright:    © 1994-1998 by Apple Computer, Inc., all rights reserved.
  10.  
  11.      Bugs?:        Please include the the file and version information (from above) with
  12.                  the problem description.  Developers belonging to one of the Apple
  13.                  developer programs can submit bug reports to:
  14.  
  15.                      devsupport@apple.com
  16.  
  17. */
  18. #ifndef __ATSLAYOUTTYPES__
  19. #define __ATSLAYOUTTYPES__
  20.  
  21. #ifndef __MACTYPES__
  22. #include <MacTypes.h>
  23. #endif
  24. #ifndef __SFNTTYPES__
  25. #include <SFNTTypes.h>
  26. #endif
  27. #ifndef __SFNTLAYOUTTYPES__
  28. #include <SFNTLayoutTypes.h>
  29. #endif
  30.  
  31.  
  32.  
  33. #if PRAGMA_ONCE
  34. #pragma once
  35. #endif
  36.  
  37. #ifdef __cplusplus
  38. extern "C" {
  39. #endif
  40.  
  41. #if PRAGMA_IMPORT
  42. #pragma import on
  43. #endif
  44.  
  45. #if PRAGMA_STRUCT_ALIGN
  46.     #pragma options align=mac68k
  47. #elif PRAGMA_STRUCT_PACKPUSH
  48.     #pragma pack(push, 2)
  49. #elif PRAGMA_STRUCT_PACK
  50.     #pragma pack(2)
  51. #endif
  52.  
  53. /* ----------------------------------------------------------------------------------------- */
  54. /* CONSTANTS */
  55. /* LineOptions flags */
  56.  
  57. enum {
  58.     kATSLineNoLayoutOptions        = 0x00000000,
  59.     kATSLineIsDisplayOnly        = 0x00000001,
  60.     kATSLineHasNoHangers        = 0x00000002,
  61.     kATSLineHasNoOpticalAlignment = 0x00000004,
  62.     kATSLineKeepSpacesOutOfMargin = 0x00000008,
  63.     kATSLineNoSpecialJustification = 0x00000010,
  64.     kATSLineLastNoJustification    = 0x00000020
  65. };
  66.  
  67. /* Miscellaneous constants */
  68.  
  69. enum {
  70.     kATSExtendedQDScale            = 81920L,                        /* fixed value of 1.25 */
  71.     kATSCondensedQDScale        = 52428L,                        /* fixed value of approx. 0.8 */
  72.     kATSItalicQDSkew            = (1 << 16) / 4,                /* fixed value of 0.25 */
  73.     kATSRadiansFactor            = 1144,                            /* fixed value of approx. pi/180 (0.0174560546875) */
  74.     kATSNoTracking                = (long)0x80000000,                /* negativeInfinity */
  75.     kATSDeletedGlyphcode        = 0xFFFF,
  76.     kATSSelectToEnd                = (long)0xFFFFFFFF,
  77.     kATSOffsetToNoData            = (long)0xFFFFFFFF
  78. };
  79.  
  80. /* --------------------------------------------------------------------------- */
  81. /* TYPES */
  82. /* --------------------------------------------------------------------------- */
  83. typedef UInt32                             ATSLineLayoutOptions;
  84. /*
  85.     The JustWidthDeltaEntryOverride structure specifies values for the grow and shrink case during
  86.     justification, both on the left and on the right. It also contains flags.  This particular structure
  87.     is used for passing justification overrides to LLC.  For further sfnt resource 'just' table
  88.     constants and structures, see SFNTLayoutTypes.h.
  89. */
  90.  
  91. struct ATSJustWidthDeltaEntryOverride {
  92.     Fixed                             beforeGrowLimit;            /* ems AW can grow by at most on LT */
  93.     Fixed                             beforeShrinkLimit;            /* ems AW can shrink by at most on LT */
  94.     Fixed                             afterGrowLimit;                /* ems AW can grow by at most on RB */
  95.     Fixed                             afterShrinkLimit;            /* ems AW can shrink by at most on RB */
  96.     JustificationFlags                 growFlags;                    /* flags controlling grow case */
  97.     JustificationFlags                 shrinkFlags;                /* flags controlling shrink case */
  98. };
  99. typedef struct ATSJustWidthDeltaEntryOverride ATSJustWidthDeltaEntryOverride;
  100. /* The JustPriorityOverrides type is an array of 4 width delta records, one per priority level override. */
  101.  
  102. typedef ATSJustWidthDeltaEntryOverride     ATSJustPriorityWidthDeltaOverrides[4];
  103. /* --------------------------------------------------------------------------- */
  104.  
  105. #if PRAGMA_STRUCT_ALIGN
  106.     #pragma options align=reset
  107. #elif PRAGMA_STRUCT_PACKPUSH
  108.     #pragma pack(pop)
  109. #elif PRAGMA_STRUCT_PACK
  110.     #pragma pack()
  111. #endif
  112.  
  113. #ifdef PRAGMA_IMPORT_OFF
  114. #pragma import off
  115. #elif PRAGMA_IMPORT
  116. #pragma import reset
  117. #endif
  118.  
  119. #ifdef __cplusplus
  120. }
  121. #endif
  122.  
  123. #endif /* __ATSLAYOUTTYPES__ */
  124.  
  125.